import request from '@/util/request'

export function getList(pageNo, size, tab, userid) {
    return request(({
        url: '/post/list',
        method: 'get',
        params: {
            pageNo: pageNo,
            size: size,
            tab: tab,
            userid:userid
        }
    }))
}

export function createPost(post) {
    return request({
        url: '/post/create',
        method: 'post',
        data: post
    })
}

export function deletePost(id) {
    return request({
        url: '/post/delete',
        method: 'delete',
        params: {
            id: id
        }
    })
}

export function getPost(id) {
    return request({
        url: '/post',
        method: 'get',
        params: {
            id: id
        }
    })
}

export function updatePost(post) {
    return request({
        url: '/post/update',
        method: 'put',
        data: post
    })
}

